-- GENERATED SPELL FOR [Sunblade Arch Mage] --


function spell0_25367(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(46553,pUnit)
pUnit:RegisterEvent('Sorts_25367', 579, 1)
end

function spell1_25367(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(46573,pUnit)
pUnit:RegisterEvent('Sorts_25367', 1350, 1)
end

function spell2_25367(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(46555,pUnit)
pUnit:RegisterEvent('Sorts_25367', 6299, 1)
end

function Sorts_25367(pUnit, Event)
local choix_sorts_25367 = math.random(0, 2)
if choix_sorts_25367 == 0 then
pUnit:RegisterEvent('spell0_25367', 1, 1)
end
if choix_sorts_25367 == 1 then
pUnit:RegisterEvent('spell1_25367', 1, 1)
end
if choix_sorts_25367 == 2 then
pUnit:RegisterEvent('spell2_25367', 1, 1)
end
end

function mob25367_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25367', math.random(1500, 3000), 1)
end

function mob25367_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25367_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25367_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25367, 1, 'mob25367_Action')
RegisterUnitEvent(25367, 2, 'mob25367_Leave')
RegisterUnitEvent(25367, 3, 'mob25367_Kill')
RegisterUnitEvent(25367, 4, 'mob25367_Die')
